<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" 
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('修改工地项目')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-project-edit" th:object="${sysProject}">
            <input name="projectId" th:field="*{projectId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">项目名称：</label>
                <div class="col-sm-8">
                    <textarea name="projectName" class="form-control">[[*{projectName}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">建设单位：</label>
                <div class="col-sm-8">
                    <textarea name="projectOwner" class="form-control">[[*{projectOwner}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">施工单位：</label>
                <div class="col-sm-8">
                    <textarea name="projectContractor" class="form-control">[[*{projectContractor}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">合同编号：</label>
                <div class="col-sm-8">
                    <input name="contractCode" th:field="*{contractCode}" class="form-control" type="text">
                </div>
            </div>
            <!-- <div class="form-group">    
                <label class="col-sm-3 control-label">归属省份：</label>
                <div class="col-sm-8">
                    <input name="provinceid" th:field="*{provinceid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">归属城市：</label>
                <div class="col-sm-8">
                    <input name="cityid" th:field="*{cityid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">归属区域：</label>
                <div class="col-sm-8">
                    <input name="areaid" th:field="*{areaid}" class="form-control" type="text">
                </div>
            </div> -->
            <div class="form-group">
                <label class="col-sm-3 control-label">地址：</label>
                <div class="col-sm-8">
                    <textarea name="address" class="form-control">[[*{address}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">执法管理人员：</label>
                <div class="col-sm-8">
                    <input name="zfMan" th:field="*{zfMan}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">投诉热线：</label>
                <div class="col-sm-8">
                    <input name="complaintsHotline" th:field="*{complaintsHotline}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="status" value="">
                        <label th:for="status" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目二维码:</label>
                <div class="col-sm-8">
                    <img th:src="'data:image/png;base64,' +*{qrCode}"/>
                </div>
            </div>
            <div class="form-group">    
                <div class="col-sm-6">
                    <a class="btn btn-success" onclick="downQrCode(*{projectId},*{createBy})"
					> <i
					class="fa fa-plus"></i> 下载二维码
				</a> 
                </div>
                <div class="col-sm-6">
                    <a class="btn btn-warning" onclick="$.table.exportExcel()"> <i
					class="fa fa-download"></i> 打印二维码
				</a>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "process/project";
        $("#form-project-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-project-edit').serialize());
            }
        }
        
        function downQrCode(id, createBy) {
            window.location.href = prefix + "/downQrCode/" + id;
        }
    </script>
</body>
</html>